﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Krile.Kernel.Control
{
    public partial interface IInputMethod
    {

        /// <summary>
        /// Parent InputControlManager
        /// </summary>
        Bridges.IInputControlManager ParentICM { get; set; }

        /// <summary>
        /// for notify post to mother
        /// </summary>
        MethodInvoker PostCallback { get; set; }

        /// <summary>
        /// for notify cancel to mother
        /// </summary>
        MethodInvoker CancelCallback { get; set; }

        /// <summary>
        /// identify string. you MUST NOT use null.
        /// </summary>
        string IdentifyString { get; }

        /// <summary>
        /// user input text
        /// </summary>
        string InputText { get; set; }

        /// <summary>
        /// extra data
        /// </summary>
        /// <remarks>
        /// this value will pass thru to post method.
        /// </remarks>
        object ExtraData { get; set; }

        /// <summary>
        /// clear all input
        /// </summary>
        void Clear();

        /// <summary>
        /// focus to text area
        /// </summary>
        void FocusToInput();

        /// <summary>
        /// mother cancelled
        /// </summary>
        void Cancelled();

        /// <summary>
        /// Reply required
        /// </summary>
        /// <param name="uid">target uid</param>
        /// <returns>if allowed set reply, returns true</returns>
        bool OnReplyRequired(ulong uid);
    }
}
